<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="java.net.URLDecoder" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
	String foodname=request.getParameter("foodname"); 
	foodname=URLDecoder.decode(foodname,"utf8"); 
	pageContext.setAttribute("foodname", foodname);
	
	String price=request.getParameter("price"); 
	price=URLDecoder.decode(price,"utf8"); 
	pageContext.setAttribute("price", price);
	
	String mark=request.getParameter("mark"); 
	mark=URLDecoder.decode(price,"utf8"); 
	pageContext.setAttribute("mark", mark);
%>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <head>
	<%@ include file="/public/head.jspf" %>
	<style type="text/css">
		form div {
			margin:10px;
		}
	</style>
	<script type="text/javascript">
		$(function(){
		
			//注册button的事件
			$("#submit").click(function(){
					//调用submit方法提交数据
					$("#ff").form('submit', {
						url: 'foodMrgAction_update.action',
						success: function(){
							//如果成功了，关闭当前窗口
							parent.$("#win").window("close");
							parent.$("#dg").datagrid("reload");
						}
					});
			});
			
			//注册button的事件
			$("#reset").click(function(){
				//重置当前表单数据
				$("#ff").form("reset");
			});
		});
	</script>
  </head>
  
  <body>
	  <form title="更新菜式" id="ff" method="post" enctype="multipart/form-data">
	  <input type="hidden" id="id" value="${param.id }" name="id">
		<div>
			<label>商品名称:</label> <input type="text" id="foodname" name="foodname" value="${foodname }"/>
		</div>

		<div>
			<label>商品价格:</label> <input type="text" id="price" name="price" value="${price }"/>
		</div>
		<div>
			<label>图片上传:</label> <input type="file" name="fileImage.upload" />
		</div>
		<div>
			<label>简单描述:</label>
			<input type="text" id="mark" name="mark" value="${mark }"/>
		</div>
		<div>
			<a id="submit" href="#" class="easyui-linkbutton">更新</a> 
<!-- 			<a id="reset" href="#" class="easyui-linkbutton">重 置</a>
 -->		</div>
	  </form>	
  </body>
</html>